import { createRouter, createWebHashHistory } from "vue-router";

// vue2: new Router()
// vue3是，需要创建什么，就使用 createXXX 即可
const router = createRouter({
  // vue2 mode: 'hash',
  // hash会有 #/
  // history: 不会有 #/
  history: createWebHashHistory(),
  routes: [
    { path: "/", component: () => import("../views/Home.vue") },
    { path: "/login", component: () => import("../views/Login.vue") },
  ],
});

export default router;
